package com.ruoyi.novel.mapper;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.novel.domain.Subscribe;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

@Mapper
public interface CollectionMapper {
    Long selectNovelIdByNovelName(String novelName);


    int addCollection(
            @Param("userId") Long userId,
            @Param("novelId") Long novelId);


    int cancelCollection(@Param("userId") Long userId, @Param("novelId") Long novelId);

    int isCollection(@Param("userId") Long userId, @Param("novelId") Long novelId);

    Long selectChapterId(@Param("orderNum")String orderNum,@Param("novelId")Long novelId);

    Subscribe selectSubscribe(@Param("userId")String userId,@Param("chapterId") Long chapterId);

    int selectIsChapterId(@Param("orderNum")String orderNum,@Param("novelId")Long novelId);
}
